@extends("admins/layouts")
@section("body")
    <div class="row">
        <div class="col-12 col-sm-4"></div>
        <div class="col-12 col-sm-4">

            @isset($_GET['error'])
                <div class="alert alert-danger alert-dismissable">
                    <button type="button" class="close" data-dismiss="alert">&times;</button>
                    {{$_GET['error']}}
                </div>
            @endisset

            @if (count($errors) > 0)
                <div class="alert alert-danger">
                    <ul>
                        @foreach ($errors->all() as $error)
                            <li>{{ $error }}</li>
                        @endforeach
                    </ul>
                </div>
            @endif

            <form method="post" action="{{ url('/admins/sys/login') }}">
                <div class="form-group">
                    <label for="usr">用户名:</label>
                    <input type="text" name="username" class="form-control" id="usr">
                </div>
                <div class="form-group">
                    <label for="pwd">密 码:</label>
                    <input type="password" name="password" class="form-control" id="pwd">
                </div>
                <div class="form-check">
                    <label class="form-check-label">
                        <input class="form-check-input" type="checkbox"> 记住密码
                    </label>
                </div>
                <div class="form-group form-group-inline">
                    <div class="form-check-inline">
                        <button type="submit" class="btn btn-primary">登陆</button>
                    </div>
                    <div class="form-check-inline">
                        <a href="{{ url('/admins/sys/regeditfrom') }}" target="_self">
                            <button type="button" class="btn btn-primary">没有！注册一个账户吧</button>
                        </a>
                    </div>
                </div>
                {{ csrf_field() }}
            </form>
        </div>
        <div class="col-12 col-sm-4"></div>
    </div>

@endsection